EXTRADEFS = -D_NTSYSTEM_ -D_ACRTIMP= -DWINBASEAPI=
MODULE    = ntdll.dll
UNIXLIB   = ntdll.so
IMPORTLIB = ntdll
IMPORTS   = $(TOMCRYPT_PE_LIBS) $(MUSL_PE_LIBS)
EXTRAINCL = $(TOMCRYPT_PE_CFLAGS)
UNIX_CFLAGS  = $(UNWIND_CFLAGS) $(HWLOC_CFLAGS)
UNIX_LIBS    = $(IOKIT_LIBS) $(COREFOUNDATION_LIBS) $(CORESERVICES_LIBS) $(RT_LIBS) $(PTHREAD_LIBS) $(UNWIND_LIBS) $(I386_LIBS) $(PROCSTAT_LIBS) $(HWLOC_LIBS)

EXTRADLLFLAGS = -nodefaultlibs
i386_EXTRADLLFLAGS = -Wl,--image-base,0x7bc00000
x86_64_EXTRADLLFLAGS = -Wl,--image-base,0x170000000

SOURCES = \
	actctx.c \
	atom.c \
	crypt.c \
	debugbuffer.c \
	env.c \
	error.c \
	exception.c \
	handletable.c \
	heap.c \
	large_int.c \
	loader.c \
	locale.c \
	math.c \
	misc.c \
	path.c \
	printf.c \
	process.c \
	reg.c \
	relay.c \
	resource.c \
	rtl.c \
	rtlbitmap.c \
	rtlstr.c \
	sec.c \
	signal_arm.c \
	signal_arm64.c \
	signal_arm64ec.c \
	signal_i386.c \
	signal_x86_64.c \
	string.c \
	sync.c \
	thread.c \
	threadpool.c \
	time.c \
	unix/cdrom.c \
	unix/debug.c \
	unix/env.c \
	unix/file.c \
	unix/loader.c \
	unix/loadorder.c \
	unix/process.c \
	unix/registry.c \
	unix/security.c \
	unix/serial.c \
	unix/server.c \
	unix/signal_arm.c \
	unix/signal_arm64.c \
	unix/signal_i386.c \
	unix/signal_x86_64.c \
	unix/socket.c \
	unix/sync.c \
	unix/system.c \
	unix/tape.c \
	unix/thread.c \
	unix/virtual.c \
	unwind.c \
	version.c \
	version.rc \
	wcstring.c

EXTRA_OBJS = unix/version.o

unix_loader_EXTRADEFS = \
	-DBINDIR=\"${bindir}\" \
	-DLIBDIR=\"${libdir}\" \
	-DDATADIR=\"${datadir}\" \
	-DSYSTEMDLLPATH=\"${system_dllpath}\"
